hatch

 

Hatch is used to create new turtles by an existing turtle. It takes the form of hatch number-of-new-turtles [ optional-commands ] The new turtles inherit all the same characteristics as the parent turtle (for example size, color, location, etc.). After being created, the new turtles will run the commands independently. (Note: because adding commands are optional, they are used if you want to change a variable from the parent or have the new turtle do something specific.) Hatch is a primitive that can only be used by turtles, that is, within an ask turtles [ … ]; only turtles can hatch turtles. To create turtles from patches, see sprout.

 

Try it Yourself

 
 
 
 
 
 
 

What's next?

Once you mastered the hatch primitive, don't stop there. Check out the resources below to improve your NetLogo skills.

 
Published NetLogo models that use the hatch primitive:
 
 
Similar primitives:
sprout

Create new turtles from a patch.

Read more
create-turtles

creates turtles with random colors and headings in the default shape of a turtle

Read more
die

Remove a turtle or link from the world.

Read more
ask

a reporter that is used to make the agents in the agentset do something.

Read more
 
Learn another primitive